package com.bone.workstation.po;

import java.util.Date;

import com.bone.constant.Constant;

/**
 * Role entity. @author MyEclipse Persistence Tools
 */

public class Role implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 106167178891022840L;
	
	// Fields
	private Long roleId;
	private String roleName;
	private String roleStatus;
	private String description;
	private Date createTime;
	private String operator;

	// Constructors

	/** default constructor */
	public  Role() {
	}

	/** minimal constructor */
	public  Role(String roleName, String roleStatus) {
		this.roleName = roleName;
		this.roleStatus = roleStatus;
	}

	/** full constructor */
	public Role(String roleName, String roleStatus, String description) {
		this.roleName = roleName;
		this.roleStatus = roleStatus;
		this.description = description;
	}

	// Property accessors

	public Long getRoleId() {
		return this.roleId;
	}

	public void setRoleId(Long roleId) {
		this.roleId = roleId;
	}

	public boolean isNormal() {
		return Constant.ACTIVATE_STATUS.NORMAL.name().equalsIgnoreCase(roleStatus);
	}
	
	public boolean isCancel() {
		return Constant.ACTIVATE_STATUS.CANCEL.name().equalsIgnoreCase(roleStatus);
	}
	
	public String getRoleName() {
		return this.roleName;
	}

	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

	public String getRoleStatus() {
		return this.roleStatus;
	}

	public void setRoleStatus(String roleStatus) {
		this.roleStatus = roleStatus;
	}

	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	public String getOperator() {
		return operator;
	}

	public void setOperator(String operator) {
		this.operator = operator;
	}

	/**
	 * 
	 * @return
	 */
	public String getRoleStatusZh() {
		return Constant.ACTIVATE_STATUS.getCnName(this.getRoleStatus());
	}
}